libxl: Allow multiple serial ports on HVM domain creation
authorWhite, Edmund H <edmund.h.white@intel.com>
Wed, 13 Aug 2014 19:08:18 +0000 (19:08 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 26 Aug 2014 20:14:32 +0000 (21:14 +0100)
commit1f9668a81ad587d4f955a9a25ffad5f9c3068041
tree51a412cc5406544c74f32e5b247180b6e712b9c1
parentbd083922f9e78ed19ef98e7de372e5f568402ed3
libxl: Allow multiple serial ports on HVM domain creation

This patch allows an HVM domain to be created with multiple serial
ports.

Since the previous interface only allowed the passing of a single
device, this requires us to add a new element to the hvm struct of
libxl_domain_build_info -- serial_list.  For API compatibility, the
old element, serial, remains.

If hvm.serial_list is set, each device listed will cause an extra
"-serial [foo]" to be appended to the qemu command line.

Callers may set either hvm.serial or hvm.serial_list, but not
both; libxl will throw an error if both are set.

In order to allow users of libxl to write software compatible with
older versions of libxl, also define LIBXL_HAVE_BUILDINFO_SERIAL_LIST.
If this is defined, callers may use either hvm.serial or
hvm.serial_list; otherwise, only hvm.serial will be available.

This patch borrows substantially from the multiple USB device patch
ac16730d0339d41fd7d129a5cb2d40ed67a303d9.

Signed-off-by: Ed White <edmund.h.white@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.h
tools/libxl/libxl_dm.c
tools/libxl/libxl_types.idl